//: annotations/InterfaceExtractorProcessorFactory.java
// APT-based annotation processing.
package annotations;
import com.sun.mirror.apt.*;
import com.sun.mirror.declaration.*;
import java.util.*;

/**
 * InterfaceExtractorProcessor的工厂类
 */
public class InterfaceExtractorProcessorFactory implements AnnotationProcessorFactory {
  //通过多态装配Processor处理器，当然这里只有一种——InterfaceExtractorProcessor
  public AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration> atds,
    AnnotationProcessorEnvironment env) {
    return new InterfaceExtractorProcessor(env);
  }

  /**
   *
   * @return 返回待处理注解的一个集合，如果没提供相应的注解全类名在字符串里面
   * 那么到时候会爆出找不到处理器
   */
  public Collection<String> supportedAnnotationTypes() {
    return Collections.singleton("annotations.ExtractInterface");
  }
  public Collection<String> supportedOptions() {
    return Collections.emptySet();
  }
} ///:~
